<template>
	<div class="move">
		<ul>
			<li v-for="item in cur_play">
				<router-link :to="'/moveDetails/'+item.id">
					<div  class="movie-item">
					<div class="movie-item-img">
						<myimg :src="item.cover.origin"></myimg>
					</div>
					<div class="desc">
						<div class="left">
							<div class="film-name">{{item.name}}</div>
							<div class="count">
								<span>{{item.cinemaCount}}</span>
								<span>家影院上映</span>
								<span>{{item.watchCount}}</span>
								<span>人购票</span>
							</div>
						</div>
						<div class="right">
							<span class="score">{{item.grade}}</span>
						</div>
					</div>
				</div>
				</router-link>
				
			</li>
		</ul>
		<div @click="showMoves" class="more-button">更多热门电影</div>
		<div class="ding_line">
			<div class="upcoming">即将上映</div>
		</div>
		<ul>
			<li v-for="item in cur_hot">
				<router-link :to="'/moveDetails/'+item.id">
				<div class="movie-item">
					<div class="movie-item-img">
						<myimg :src="item.cover.origin"></myimg>
					</div>
					<div class="desc">
						<div class="left">
							<div class="film-name">{{item.name}}</div>
						</div>
						<div class="right">
							<span class="score" style="font-size: 12px">7月12日上映</span>
						</div>
					</div>
				</div>
			 </router-link>
			</li>
		</ul>

	</div>
</template>
<script>
	import hotMove from "./hotMove"
	import myimg from "./myimg";
	import axios from "axios";
	import router from "../js/router";
	export default {
		name: "index",
		data() {
			return {

			}
		},
		props: ["cur_play", "cur_hot"],
		components: {
			myimg,
		},
		methods: {
			showMoves() {
				this.$router.push("/hotMove")
			},
			showDetails(){
				this.$router.push("/moveDetails")
			}
		}
	}
</script>
<style lang="scss" scoped>
	.move {
		ul {
			padding-top: 18px;
			li {
				margin: 0 17px 17px;
				background-color: #f9f9f9;
				box-shadow: .5px .5px 1px #a8a8a8;
				cursor: pointer;
				.movie-item-img {
					overflow: hidden;
				}
				.desc {
					overflow: hidden;
					.left {
						padding: 13px 0 13px 13px;
						float: left;
						.film-name {
							font-size: 12px;
							line-height: 15px;
						}
						.count {
							font-size: 8px;
							color: #9a9a9a;
							line-height: 15px;
						}
					}
					.right {
						float: right;
						padding-top: 13px;
						padding-right: 13px;
						color: #f78360;
						.score {
							font-size: 18px;
						}
					}
				}
			}
		}
		.ding_line {
			position: relative;
			margin-top: 30px;
			margin-bottom: 30px;
			border-bottom: 1px solid #a8a8a8;
			.upcoming {
				width: 65px;
				height: 20px;
				margin: 0 auto;
				margin-bottom: -10px;
				border-radius: 5px;
				font-size: 10px;
				line-height: 20px;
				text-align: center;
				color: #eee;
				background-color: #a7a7a7;
			}
		}
		.more-button {
			width: 160px;
			height: 30px;
			border: 1px solid #aaa;
			border-radius: 15px;
			margin: 10px auto 30px;
			text-align: center;
			line-height: 30px;
			font-size: 12px;
			color: #616161;
			cursor: pointer;
		}
	}
</style>